import request from './request'
// import axios from 'axios'
import qs from 'qs'
// 轮播图
export const BannerApi = () => request.get('/banner')
// 推荐歌单
export const Tuijiange = () =>request.get(`/personalized?limit=5`)
// 推荐电台 /personalized/djprogram
export const Tuijiandt = () =>request.get(`/program/recommend`)
// 新碟推荐 /album/new
export const Newdetuijian = () =>request.get(`/album/new?area=ALL&limit=10`)
// 二维码登录 (生成二维码) /login/qr/key
export const erweima = (params) =>request.get(`/login/qr/key`,params.timerstamp)
// 二维码生成接口 /login/qr/create
export const scerweima = (pamers) =>request.get(`/login/qr/create?key=${pamers.key}&qrimg="qrimg"`,pamers.timerstamp)
// 扫码验证 /login/qr/check
export const yanzheng = (pamers) =>request.get(`/login/qr/check?key=${pamers.key}`,pamers)
// 游客登录 /register/anonimous
export const youke = () =>request.get(`/register/anonimous`)
// 刷新新的状态 /login/refresh
export const sx = () =>request.get(`/login/refresh`)
// 登录状态查询 
export const dlzhuangtai = (pamers) =>request.get(`/login/status?cookie=${pamers}`)
// 获取验证码 /captcha/sent
export const yanzhengma = (pamers) =>request.get(`/captcha/sent?phone=${pamers}`)
// 验证验证码 /captcha/verify
export const yzyanzhengma = (pamers) =>request.get(`/captcha/verify?phone=${pamers.phone}&captcha=${pamers.captcha}`)
// 手机登录 /login/cellphone?phone=xxx&captcha=1234
export const shoujidenglu = (pamers) =>request.get(`/login/cellphone?phone=${pamers.phone}&captcha=${pamers.captcha}`)
// 退出登录 /logout
export const outlogin = () =>request.get(`/logout`)
// 用户详情 /user/detail
export const yonghu = (pamers) =>request.get(`/user/detail?uid=${pamers}`)
// 用户歌单 /user/playlist
export const yonghugd = (pamers) =>request.get(`/user/playlist?uid=${pamers}`)
// 所有榜单 /toplist
export const Allbangdan = () =>request.get(`/toplist`)
// 歌单详情 /playlist/detail
export const gedanxiang = (pamers) =>request.get(`/playlist/detail?id=${pamers}`)
// 歌单所有歌曲 /playlist/track/all?id=24381616
export const Allgequ = (pamers) =>request.get(`/playlist/track/all?id=${pamers}`)
// 获取音乐 url/song/url?id=
export const reqSongUrl = (id) => request({ url: `/song/url?id=${id}`, method: 'GET' });
// 音乐是否可用/check/music?id=33894312
export const reqSongUrlUse = (id) => request({ url: `/check/music?id=${id}`, method: 'GET' });
// 获取歌单评论 /comment/playlist?id=705123491
export const reqCommentPlayList = (id, limit = 20, offset = 0, cookie) => request({ url: `/comment/playlist?id=${id}&limit=${limit}&offset=${offset}&cookie=${cookie}`, method: 'GET' });
// 歌单  /top/playlist order=new
export const Gedan = () =>request.get(`/top/playlist`)
// 推荐节目接口 /program/recommend
export const Recommend = () => request.get("/program/recommend")
// 节目排行榜接口/dj/program/toplist?limit=1
export const ProgramList = () => request.get("/dj/program/toplist?limit=10")
// 音乐推荐接口 /dj/recommend
export const MusicRecommendation = () => request.get("/dj/hot?limit=4")
// 歌手分类列表
export const artistList = (params) => request.get(`/artist/list?type=${params.type}&area=${params.area}&limit=${params.limit}`);
// 热门歌手
export const artistHot = () => request.get(`/top/artists?limit=30`);
//  热门新碟 /top/album
export const Getnewdie = (params) => request.get(`/top/album?type=${params.type}`)

// 全部新碟 /album/new
export const GetAllnewdie = (params) => request.get(`/album/new`, { params })
//搜索 /cloudsearch
export const GetsousuoApi = (parmes) => request.post(`/search?keywords=${parmes}`)